public class MyIdeaExtension {
    public MyIdeaExtension(ApexPages.StandardController controller) {

    }
   
    private final ApexPages.IdeaStandardController ideaController;
    
    public MyIdeaExtension(ApexPages.IdeaStandardController controller) {
        ideaController = (ApexPages.IdeaStandardController)controller;
    }
    
    public List<IdeaComment> getModifiedComments() {
        IdeaComment[] comments = ideaController.getCommentList();
        // modify comments here 
    
        return comments;
    }
    
}